#ifndef _PIGOS_TYPE_H_
#define _PIGOS_TYPE_H_

typedef unsigned char	u8_t;
typedef unsigned short	u16_t;
typedef unsigned long	u32_t;

#ifndef NULL
#define NULL 0
typedef unsigned long	time_t;
#endif

#define container_of(ptr, type, member)	\
	(type *)( (char *)ptr - ((int) &((type *)0)->member))

#define ADD_TAIL(size, unit) \
	((size) / (unit) + ((size) % (unit) ? 1 : 0))

#define MAX(a, b)		((a) > (b) ? (a) : (b))
#define MIN(a, b)		((a) < (b) ? (a) : (b))

#endif
